package com.zwr.sheller.sso.Service;

import com.zwr.sheller.core.common.WQQBusinessException;
import com.zwr.sheller.core.pojo.User;

import java.util.Map;

/**
 * @Author: 18032
 * @Date: 9:23 2022/1/11
 */
public interface LoginService {

    /**
     * 登录接口
     * @param phone
     * @param pwd
     * @return
     */
    Map<String,Object> login(String phone, String pwd) throws WQQBusinessException;

    /**
     * 检查是否带有token
     * @param token
     * @return
     * @throws WQQBusinessException
     */
    User checkToken(String token) throws WQQBusinessException;

    /**
     * 忘记密码的时候修改密码
     * @param phone
     * @param code
     * @return
     */
    Integer forgetPwd(String phone,String code,String pwd) throws WQQBusinessException;

    /**
     * 注册新用户
     * @param user
     * @return
     */
    Integer addNewUser(User user,String code) throws WQQBusinessException;
}
